Geomagnetic application device

ABSTRACT

A geomagnetic application device including a triaxial magnetic sensor, a measurement point acquiring mechanism, a calibration mechanism calibrating offset of the magnetic sensor, and an azimuth calculator. The calibration mechanism includes an offset calculation measurement point selector selecting at least six measurement points of the geomagnetic vectors from among a data set stored in the measurement point storage unit by the measurement point acquiring mechanism and storing the selected measurement points in an offset calculation measurement point storage unit. The offset calculation measurement point selector selects the measurement points from among the data set stored in the measurement point storage unit to include at least six points, component values of which are maximum or minimum in each of three orthogonal axes.

TECHNICAL FIELD

The present invention relates to a geomagnetic application device thatmeasures earth magnetism using a magnetic sensor and utilizes themeasured value, and relates to a mobile device having any function suchas an electronic compass, an air mouse, a magnetic gyroscope, and AR(also mentioned as augmented reality). More particularly, the inventionrelates to a geomagnetic application device that can correctly measure,by performing adequate calibration, an azimuth which the geomagneticapplication device faces, even in a case where an azimuth sphereincluding measurement points obtained with a triaxial magnetic sensor isan ellipsoidal sphere rather than a true sphere for the reason that, forexample, sensitivities of the triaxial magnetic sensor are differenteach other.

BACKGROUND ART

Various geomagnetic application devices have been used that measure ageomagnetic vector and utilize results of the measurement, such as anelectronic compass which includes a magnetic sensor for detecting earthmagnetism and performs azimuth measurement based on a geomagnetic vectordetected with the magnetic sensor and an air mouse which enablesoperations on a computer screen by changing its own direction in theair. In this case, the electronic compass can calculate its own azimuthbased on the data of a geomagnetic vector obtained from the magneticsensor and use it when deciding a user's traveling direction innavigation for guiding him to his destination on the screen of acellular phone, etc. The air mouse having a built-in magnetic sensor isrotated in the air to calculate its own direction from the earthmagnetism detected during the rotation, and enables an operation oncomputer screen based on the calculated direction. Further, a magneticgyroscope can calculate a rotation axis based on detected results ofearth magnetism to obtain its own rotation angle and angular speed,therefore, it is very important in this case also to accuratelycalculate an azimuth, etc. from the detected earth magnetism. As statedabove, detection of earth magnetism can be applied for various purposes,the geomagnetic vector is required to be accurately measured for suchoccasions.

The geomagnetic application devices mainly include mobile devices suchas a cellular phone, a portable game machine, and a tablet PC forportable use. Because such a geomagnetic application device incorporatesa magnetized electronic component such as a speaker, the magnetic sensorbuilt in the device consequently detect a magnetic field as combined oneconsisting of earth magnetism and a magnetic field generated by such anelectronic component. Therefore, calibration processing is required tocorrect an error (offset) caused by the magnetic field generated by thebuilt-in electronic component of the geomagnetic application device.

Accordingly, in the past, an offset value was estimated by utilizingpostural change of the geomagnetic application device, which wasresulted from users' operation of the device for some purpose. And insome cases, the geomagnetic application device was forced to rotate bythe user in a specific manner so as to cause postural change of thedevice and to be measured with the magnetic sensor. Then, an offsetvalue was estimated on the basis of measured data on a magnetic sensor,which had been collected in various postures of the device.

Specifically, if output components of a triaxial magnetic sensor duringrotating under constant earth magnetism are respectively plotted in aspace, the resultant trajectory forms a sphere. The sphere is referredto as an azimuth sphere, a center point of which corresponds to anoffset of the magnetic sensor. Therefore, calibrating the offset is noneother than employing the center point of the azimuth sphere obtainedbased on the earth magnetism measured in the various azimuths andpostures as a new offset value. The radius of the azimuth spherecorresponds to the intensity of earth magnetism.

To accurately obtain coordinates of the center point of the azimuthsphere, it is necessary to obtain data of measurement points on theazimuth sphere in an area as wide as possible by operation for turningthe geomagnetic application device in every direction evenly.

However, such operations impose excessive burdens on the user. Toeliminate the burdens, a technique has been proposed that utilizes achange in posture of the geomagnetic application device, which wasresulted from users' operation which the user thinks necessary withoutpurposely requesting the user to conduct a specific operation forturning the device so that the data which satisfies certain conditionsadequate to accurately determine the azimuth sphere are selected amongthe obtained measurement points to obtain the center point of theazimuth sphere (Patent Document 1).

RELATED ART DOCUMENT Patent Documents

-   Patent Document 1: JP-A 2008-241675-   Patent Document 2: JP-A H9-68431

SUMMARY OF THE INVENTION Problem to be Solved by the Invention

Patent Document 1 described above is premised on the assumption that thetriaxial magnetic sensor built in a geomagnetic application device hasthe same sensitivity in three axes respectively and provides the sameoutput voltage for geomagnetic vector having the same magnitude. On suchpremise, the azimuth sphere is a true sphere having a constant radiusirrespective of the azimuth.

However, as described above, the geomagnetic application deviceincorporates magnetized electronic components. In particular, some ofthe magnetized electronic components have soft magnetic properties whichare apt to collect magnetic lines. If the geomagnetic sensor is disposednear such a component, there is a possibility that the geomagneticsensor may be strongly affected from magnetism of the component in acertain azimuth. Further, in some cases, irregularities duringmanufacturing may cause a difference in sensitivity among the three axesin the triaxial magnetic sensor. In such a case, the azimuth spherebecomes an ellipsoidal sphere rather than a true sphere, so that anaccurate offset correction is made impossible because the offset valueis obtained on the premise of a true sphere. That is, it is necessary toexamine a method for selecting a measurement point suitable forobtaining an offset value in a case where the azimuth sphere becomes anellipsoidal sphere.

A patent application already has been filed (for example, PatentDocument 2 described above), which has an object to obtain an offsetvalue in a case where the azimuth sphere or the azimuth circle becomesellipsoidal. However, in the past patent applications including PatentDocument 2, which were filed hitherto and intended to calculate offsetvalues in consideration of an ellipsoidal sphere, there can be foundonly the description that obtained measurement points are allowed to beused in offset calculation without selection. Among others, in a casewhere a measured value to be detected are not of two axes as in the caseof Patent Document 2 but of three axes, calculation of a center pointrequires to obtain the measured points in various directions as comparedto the case of two axes. Thus, data obtained only by simple rotation insingle plane (such as rotation of a ship etc.) cannot make preciseoffset value calculation possible. Further, as mentioned above, in acase where measurement points are required in various directions in sucha three-dimensional space, even if the user rotates the geomagneticapplication device in a manner to trace out a figure-of-8, themeasurement points required to obtain an offset value are notnecessarily obtained evenly in every direction. Therefore, in the samemanner as the method in the technique of Patent document 1 whereinmeasurement points suitable for obtaining the center coordinates of thetrue sphere are selected, it is necessary to examine a method ofselecting measurement points suitable for obtaining the ellipsoidalsphere so as to strictly select measurement points enable to calculateprecise offset values employing the measurement points obtained in thelimited directions and to obtain the center point of the ellipsoidalsphere employing smaller number of the points and smaller calculationamount. However, none of the conventional applications has sufficientdisclosure about it.

In the case where calculation is performed without selection of suchmeasurement points, if the measurement points gather in a certain regionon the azimuth sphere and are thinly distributed in other regions, onlyan ellipsoidal sphere remarkably depending on the data of the gatheredmeasurement points can be obtained and it will become difficult toobtain the center point with high precision.

The present invention intends to newly provide a geomagnetic applicationdevice having a step of selecting a measurement point that enables toperform accurate offset correction even in the case that an azimuthsphere is an ellipsoidal sphere rather than a true sphere, and toperform offset correction with less azimuth errors even in the case thatmeasurement points are selected in smaller numbers.

Means for Solving the Problems

The present invention relates to a geomagnetic application device thatmeasures earth magnetism and utilizes the measured value of the earthmagnetism, and provides

a geomagnetic application device applying earth magnetism using a valueof the earth magnetism determined by measurement, the device comprising:

a triaxial magnetic sensor orthogonally arranged to detect triaxialcomponents of a geomagnetic vector which vary with movement of thegeomagnetic application device or with postural change of thegeomagnetic application device, as orthogonal triaxial component data;

a measurement point acquiring means for acquiring a predetermined numberof geomagnetic vectors using the triaxial magnetic sensor and storingacquired data in a measurement point storage unit;

a calibration means for calibrating offset of the triaxial magneticsensor; and

an azimuth calculation means for calculating an azimuth which thegeomagnetic application device faces, correcting the geomagnetic vectorsbased on a calibrated offset value obtained by the calibration means,which is characterized in

that the calibration means is provided with an offset calculationmeasurement point selection means for selecting at least six measurementpoints of the geomagnetic vectors from among a data set stored in themeasurement point storage unit by the measurement point acquiring meansand storing the selected measurement points in an offset calculationmeasurement point storage unit, and an offset value calculation meansfor obtaining coordinates of a center point of an ellipsoidal sphere bysolving an equation of an ellipsoidal sphere body based on the at leastsix measurement points stored in the offset calculation measurementpoint storage unit and for storing the obtained coordinates in acalibrated offset value storage unit,

that the offset calculation measurement point selection means isconfigured to select the measurement points from among the data setstored in the measurement point storage unit so as to include at leastsix points, the component values of which are maximum or minimum in eachof the three orthogonal axes, and

that the offset value calculation means calculates parameters whichdefine the ellipsoidal sphere as an azimuth sphere, based on the data ofthe selected measurement points.

Effects of the Invention

In the aforesaid geomagnetic application device, a plurality of magneticvector values is detected by means of the triaxial magnetic sensor,utilizing direction change of the geomagnetic application device, whichwill be caused by movement of the user who takes along the device in hisbag or pocket, utilizing direction change of the device, which will becaused during operation of the user who handles the device whilewatching the display, and in some cases, utilizing postural change ofthe device, which will be caused by the user's rotating operation whichis purposely conducted, for example, in a manner to trace out afigure-of-8 once or several times as far as such operation will notexcessively burden the user. Then, from among the plurality of thedetected values, the measurement points are selected so as to include atleast points (6 points in total), the component values of which aremaximum or minimum in each of the three orthogonal axes. And then, thecenter point of an azimuth sphere is calculated with an ellipsoidalsphere equation using the selected 6 or more measurement points.

The geomagnetic application device in the present invention refers toevery product that, as described in the title of the invention, measuresearth magnetism and utilizes the measured value for any purpose. Thatis, as far as earth magnetism is utilized, irrespective of uses, it isindispensable to obtain an offset value and correct a detectedgeomagnetic vector in common. The applied product may specifically be,for example, an electronic compass which calculates an azimuth by usingearth magnetism and displays it on a screen, a portable device such as acellular phone which performs position navigation by using GPSinformation also, augmented reality (AR) which similarly identifies acurrent position and displays its information on the screen, a magneticgyroscope which decides a change in posture of a geomagnetic applicationdevice based on earth magnetism to obtain a rotation axis, a rotationangle, and a rotation angular speed, or an air mouse.

The change in posture of the geomagnetic application device greatlyvaries with the process of a change in behavior of the user using it. Tocalculate the center point of the ellipsoidal sphere more accurately, itis ideal to obtain geomagnetic vectors in condition where thegeomagnetic application device faces various directions in athree-dimensional space. However, if the obtained measurement points areused as they are, only the data in a certain specific direction may havebeen unevenly obtained in some cases. In such a case, even if the numberof the data pieces of the measurement points themselves is large, it isdifficult to accurately obtain the center point of the ellipsoidalsphere. To solve the problem, in the present invention, some of themeasurement points are selected among the obtained data set in a mannerto include at least two points (six points in total), the componentvalues of which are maximum or minimum in each of the axes of thethree-axis orthogonal coordinate system so as to enable accuratelycalculating the center point of an azimuth sphere using the minimumrequired number of measurement points.

That is, in the case where many measurement points are distributed in acertain region on an azimuth sphere, if a least-squares method isperformed on the data of such measurement points input withoutselection, errors of the existing measurement points will be totalizedand then minimized. In contrast, according to the method of the presentinvention, in the case where measurement points are concentrated in sucha certain region, even if selection is conducted from the measurementpoints existing in the region only a single point is selected amongthese concentrated measurement points, and at least five points otherthan the one point are selected from any other areas. Therefore, even ifthe measurement points are unevenly distributed in a certain area,according to the present invention, the measurement points in the otherareas are also selected similarly so that an offset can be securelycalculated accurately.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a conceptual diagram of a geomagnetic application device inFirst Embodiment;

FIG. 2 is a partially transparent perspective view of a cellular phonehaving functions of an electronic compass in First Embodiment, which isan example of the geomagnetic application device;

FIG. 3 is a block diagram of the electronic compass in First Embodiment,which is an example of the geomagnetic application device;

FIG. 4 is a view showing a detected magnetic vector value and positionsof a center point before and after correction;

FIG. 5 is an explanatory view of a method of selecting points at whichX-axis and Y-axis components are maximized and minimized;

FIG. 6 is an explanatory view of a method of selecting points at whichaxial components of virtual axes inclined by 45 degrees with respect tothe X-axis and Y-axis respectively are maximized and minimized;

FIG. 7 is an explanatory flowchart of a procedure for selecting the 11ththrough 18th measurement points in the first embodiment; and

FIG. 8 is a perspective view of a triaxial magnetic sensor in the firstembodiment.

MODE FOR CARRYING OUT THE INVENTION

A description will be given of preferred embodiments of the presentinvention described above.

It is preferable that the aforesaid offset calculation measurement pointselection means selects arbitrary two axes among the three orthogonalaxes to define two axes as virtual coordinate axes inclined by 30 to 60degrees with respect to the two axes respectively, further selectspoints, the component values of which are maximum or minimum in each ofthe virtual coordinate axes and stores the selected points in the offsetcalculation measurement point storage unit, and calculates theparameters which define the ellipsoidal sphere as an azimuth sphere,based on the selected measurement points.

The center point of an ellipsoidal sphere can be calculated accuratelyby using measurement points in as many directions as possible.Consequently, according to claim 2, besides points selected in claim 1at which the component values of each of three orthogonal axes aremaximized and minimized, virtual coordinate axes inclined by 30 through60 degrees with respect to two arbitrary ones of those three orthogonalaxes are defined to additionally select points at which the componentvalues of each of the two virtual coordinate axes are maximized andminimized from among those stored in a measurement point storage unit.As a result, a total of at least 10 measurement points (unless theyoverlap with the measurement points selected in claim 1) are used toobtain the center coordinate of the ellipsoidal sphere. Accordingly,accuracy can be further improved in calculations of the centercoordinate of the ellipsoidal sphere.

The inclination angle of the arbitrarily selected two axes with respectto the three orthogonal axes is preferably 40 through 50 degrees andmore preferably 45 degrees. Further, those selected two axes may beinclined to a direction in a plane including them or a directioninclined with respect to the plane. In either way, the same effects canbe obtained in improving the calculation accuracy.

It is preferable that the aforesaid offset calculation measurement pointselection means repeats a procedure of taking out the data of themeasurement points one at a time from among the data set stored in themeasurement point storage unit except for the measurement pointsselected by the offset calculation measurement point selection meansrecited in claim 1 or 2, and newly storing the measurement points takenout in the offset calculation measurement point storage unit only if thedistance from the measurement point to all of the measurement pointsalready selected and stored in the offset calculation measurement pointstorage unit are equal to or more than a predetermined value, asdecreasing the predetermined value serving as a standard little bylittle, until a predetermined number of the points are stored.

To calculate the center coordinate more accurately, it is necessary toadd measurement points to be found on an azimuth sphere in a directionthat a sufficient number of measurement points has not yet been obtainedto a data set consisting of the measurement points selected in claim 1or in claims 1 and 2 for offset calculation, the axial components ofwhich are maximum or minimum in each orthogonal axis. For this purpose,in claim 3, only the measurement points that meet a requirement that thedistance from all of the measurement points which already have beenselected from the measurement point storage unit and have been stored inthe offset calculation measurement point storage unit should be equal toor more than a predetermined value are selected in addition to themeasurement points already selected so as to obtain the center pointcoordinates of the ellipsoidal sphere by using all of the measurementpoints finally selected.

In the selection, the predetermined threshold value as a condition forthe selection is defined first, and then measurement points yet to beselected are fetched from the measurement point storage unit one by oneto calculate a distance from this measurement point to every measurementpoint already selected. Only if the calculated distance to everymeasurement point is equal to or more than the predetermined thresholdvalue, the measurement point is newly stored in the offset calculationmeasurement point storage unit. This operation is repeated on all themeasurement points yet to be selected as decreasing the predeterminedthreshold value little by little until the number of the selectedmeasurement points reaches a predetermined value.

By performing the thus described measurement point selecting process, itis possible to securely select measurement points all over an azimuthsphere in all areas and in various directions evenly, although limitedto the measurement points previously stored in the measurement pointstorage unit, so that it is possible to securely improve the centerpoint calculation accuracy efficiently even in a smaller number ofmeasurement points.

In addition, it is preferable that the aforesaid offset valuecalculation means calculates the parameters of the ellipsoidal sphere byusing least-squares method based on the selected measurement points.Every measured geomagnetic vector has an error. To solve the problem, aplurality of selected measurement points is used to obtain parameters ofan equation of an ellipsoidal sphere by using the least-squares method.As a result, effects can be provided such that the errors of therespective measurement points may offset each other, thereby obtainingthe ellipsoidal sphere which is an accurate azimuth sphere.

Further, in the present invention, it is preferable to be characterizedin

that instructions to induce rotating operation are displayed on a screenof the geomagnetic application device, and then the measurement pointacquiring means is performed during the rotating operation thus induced.

The user does not always use functions such as electronic compassfunctions which require geomagnetic vector measurement results when heis carrying around the geomagnetic application device. Even in a casewhere the user does not directly operate the geomagnetic applicationdevice, if the geomagnetic application device is, for example, acellular phone, he cannot know when he gets a phone call or e-mail and,therefore, would carry it around in his bag or pocket ordinarily incondition where it is in the power-on state. Therefore, if the userchanges his direction while moving, the direction of the geomagneticapplication device such as the cellular phone also changes. When ane-mail arrives, he takes an action to take the geomagnetic applicationdevice out of the pocket, during this action the direction of the devicechanges further. Therefore, ordinarily, without forcing the user toperform operations purposely, a spontaneous change in posture of thegeomagnetic application device can be used to obtain measurement pointsin various directions.

However, if he wants to use the functions of the application apparatuswhich require geomagnetic data before a sufficient number of measurementpoints have been obtained, for example, he wants to use the applicationapparatus functions which require geomagnetic vector values to bemeasured immediately after the power is turned on, some cases need themeasurements points to be obtained quickly. Therefore, in such a case,an operator guidance screen requesting rotating operations can bedisplayed on the screen of the application apparatus such as a portabledevice to request him to perform the operations. In such a manner, thenecessary data can be securely obtained in a short period of time.

Further, it is preferable that the geomagnetic vector is detected duringoperation of the measurement point acquiring means, for example,rotating operations conducted by the user as suggested in claim 5, and adifference is obtained in real time during acquisition between a maximumvalue and a minimum value of data of each axial component of the threeorthogonal axes using the acquired measurement points and then anindication to the effect that the operation of the measurement pointacquiring means has ended is displayed on the screen of the geomagneticapplication device on condition that a predetermined number of themeasurement points is obtained at a point where the measurement points,the difference of which exceeds a predetermined reference value for allof the three axes are obtained.

In rotating operations conducted by the user as recited in claim 5, therotation direction varies depending on individual user, so that in somecases there is a possibility to raise a case that few measurement pointsmay have been obtained in some directions on an ellipsoidal sphere,depending on his operating manner. Therefore, to check if a sufficientnumber of the measurement points are obtained to determine a centerpoint of the ellipsoidal sphere, data is obtained during the rotationand a difference is obtained in real time between a maximum value and aminimum value of each axial component of the three orthogonal axes andcompared to a predetermined reference value. If the data can be obtainedin a manner such that the difference between the maximum and minimumvalues may be equal to or more than the predetermined threshold valuefor all of the axial components of the three orthogonal axes, it ispossible to terminate the operation of measurement point acquiring meanson condition that the measurement points in excess of a predeterminednumber have been obtained and to display on the screen of thegeomagnetic application device an indication to the effect that therotating operations are not necessary any more. It is thus possible tosecurely obtain measurement points required to accurately determine thecenter point of an ellipsoidal sphere when the user is performingrotating operations.

If the rotating operations by the user are not adequate enough to obtainmeasurement points that meet the standard, it is preferable to indicateinstructions such as “Change your body direction and retry” or “Rotatethe device and point in the different direction”.

Not limited to the case that rotating operations are enforced as recitedin claim 5, it is preferable to similarly check the data of thedifference between the maximum and minimum values for all the axialcomponents of the three orthogonal axes and it is of course possible tocheck if measurement points that meet the standard are obtained. In sucha case also, if it is decided that a sufficient number of themeasurement points are obtained, it is of course possible to display anindication to the effect that the operation of the measurement pointacquiring means has ended, that by contraries a sufficient number of themeasurement points are yet to be obtained, or that acquisition of thedata is further to be continued.

It is preferable that when the geomagnetic vector is detected insequence during operation of the measurement point acquiring means, areference point serving as a standard is first acquired, and then anacquisition means is repeated for storing a point having a predetermineddistance from the reference point in the measurement point storage unitonly in a case where such point is acquired to define the point as anupdate reference point, and further storing a point having apredetermined distance from the updated reference point in themeasurement point storage unit.

The recent geomagnetic sensors are capable of consecutively obtainingmany measurement points in a short lapse of time. Accordingly, in thecase where the geomagnetic application device is not changed in postureat all, even if geomagnetic vectors are measured consecutively, aplurality of points is merely obtained consecutively at almost the sameposition on an azimuth sphere. Even if many points obtained at almostthe same position are stored, it does not contribute to an improvementin accuracy of offset value calculations at all. In obtainingmeasurement points and storing them in the measurement point storageunit, until a measurement point is obtained which is distant by at leasta predetermined distance from the measurement point most recently storedin the measurement point storage unit, no measurement point is to benewly stored in the measurement point storage unit. If a measurementpoint which is distant to some extent is obtained, it is to be newlystored. In such a manner, by storing a smaller number of measurementpoints, it is possible to securely obtain measurement points required toaccurately determine the center point of an ellipsoidal sphere. In thecase of enforcing the user to perform rotating operations as in the caseof claim 5, at a point where a predetermined number of the measurementpoints are stored, it is also possible to display an indication on thescreen of the geomagnetic application device to the effect that therotating operations are over and to notify that rotating operations arenot necessary any more.

It is preferable that the azimuth calculation means obtainssensitivities of the triaxial magnetic sensor based on lengths of mainaxes obtained by solving the ellipsoidal sphere equation and calculatesan azimuth which the geomagnetic application device faces based on avalue of the geomagnetic vectors corrected on the basis of the obtainedsensitivities.

To calculate an azimuth accurately, it is necessary to correct athree-axis orthogonal magnetic sensor so that the three axes have thesame sensitivity, and then use the respective axial component valuesobtained after offset correction. As already described, the length ofeach main axis of the three orthogonal axes can be obtained by obtainingan equation of the ellipsoidal sphere using the selected measurementpoints. Therefore, an azimuth which the geomagnetic application devicefaces can be calculated using component values of the three orthogonalaxes after their sensitivities are corrected based on the values of thelengths. Azimuth data thus obtained can be used not only in anelectronic compass but also in various applications.

EMBODIMENTS First Embodiment

The following will describe one embodiment of the present invention, inwhich the present invention is applied to an electronic compass built ina portable device.

The electronic compass according to the embodiment of the presentinvention will be explained with reference to FIGS. 1 to 8.

As shown in FIG. 2, an electronic compass 1 of the present embodiment ismounted on a portable device 2. The electronic compass 1 calculates anazimuth which the portable device 2 faces while compensating for aninfluence from an internal magnetic field of the portable device 2.

As shown in FIG. 1, the electronic compass 1 includes a triaxialmagnetic sensor 3, a measurement point acquiring means 4, an offsetcalculation measurement point selection means 5, an offset valuecalculation means 6, and an azimuth calculation means 7.

As shown in FIG. 2, the triaxial magnetic sensor 3 detects earthmagnetism as a magnetic vector M in a three-axis orthogonal coordinatesystem which is fixed to the portable device 2.

The measurement point acquiring means 4 utilizes postural change of theportable device 2, which results from movement of the user carryingabout the device 2 or is caused by the user's operation directlyconducted in his hands, to obtain geomagnetic vector data in the variouspostures of this portable device 2 using the triaxial magnetic sensor 3.In this case, in order to obtain an accurate offset value by means ofthe offset value calculation means which will be explained later, inspite of acquisition of a smaller number of measurement points, it ispreferable to obtain the measurement points while making an effectiveselection of the measurement points, for example, by storing in ameasurement point storage unit 8 a measurement point present at adistance every time such measurement point has been obtained.

The offset measurement point selection means 5 selects only measurementpoints that satisfy predetermined conditions from among a data setstored in the measurement point storage unit 8 to select the measurementpoints that enable accurately calculating a center point of anellipsoidal sphere and stores the data of geomagnetic vectors aboutthose measurement points in an offset calculation measurement pointstorage unit 9.

The offset value calculation means 6 obtains coordinates of the centerpoint by solving an equation of the ellipsoidal sphere using the data ofthe geomagnetic vectors stored in the offset calculation measurementpoint storage unit 9, to calculate an offset value, which is aninfluence of magnetic vectors other than the earth magnetism detected bythe three-axis sensors.

The azimuth calculation means 7 calculates an azimuth which thegeomagnetic application device faces by correcting the data of thegeomagnetic vectors obtained with the triaxial magnetic sensor, based onthe offset value obtained by the offset value calculation means 6 and alength of a main axis of the ellipsoidal sphere obtained by solving theellipsoidal sphere equation, that is, a sensitivity specific to eachaxis of the triaxial magnetic sensor.

It will be described in detail as follows.

As shown in FIG. 2, the portable device 2 has the triaxial sensor 3 anda microcomputer 100 mounted thereon. In addition to them, a plurality ofelectronic components 200 is mounted. The electronic components 200generate a magnetic field inside the portable device 2, by which thetriaxial magnetic sensor 3 is affected.

The portable device 2 further includes a display unit 20. The displayunit 20 indicates an azimuth which the geomagnetic application devicefaces, based on an azimuth calculated with the electronic compass of thepresent invention. The device 2 can also display a map of thesurrounding area of the current position as adjusting the directionbased on the calculated azimuth in a manner such that the upwarddirection of the display screen may be coincident with a travelingdirection.

As shown in FIG. 3, the microcomputer 100 includes a CPU 10, an ROM 11,an RAM 12, an I/O 14, and a line 13 interconnecting them. The ROM 11stores a program 11 p. The RAM 12 has memory allocated, which isavailable to store obtained measurement point data or selectedmeasurement points, and the measurement point storage unit 8, the offsetcalculation measurement point storage unit 9, and a yet-to-be-selectedmeasurement point storage unit 16 are allocated as memory to storemeasurement points obtained as a result of executing the program 11 p.In this configuration, when the CPU 10 reads the program 11 p from theROM 11 and executes it, the measurement point acquiring means 4, theoffset calculation measurement point selection means 5, the offset valuecalculation means 6, and the azimuth calculation means 7 of the presentembodiment will be operated.

Further, to the microcomputer 100, the triaxial magnetic sensor 3 andthe display unit 20 are connected. The triaxial magnetic sensor 3detects magnetic vectors, for example, every several milliseconds andtransmits the detected values to the microcomputer 100.

As shown in FIG. 8, the triaxial magnetic sensor 3 includesmagneto-impedance sensor elements 30. That is, the triaxial magneticsensor 3 is formed by arranging the three magneto-impedance sensorelements 30 in a manner such that their magneto-sensitive directions areidentical to mutually orthogonal three axis directions (X-axis, Y-axis,and Z-axis directions) respectively.

However, because the triaxial magnetic sensor 3 is affected by aninternal magnetic field of the portable device 2, as shown in FIG. 4, acenter point O′ of an azimuth sphere 15 of the triaxial magnetic sensor3 shifts from an origin O of the triaxial magnetic sensor 3 and, ifthere is a difference in sensitivity of each axis of the triaxialmagnetic sensor owing to, for example, an effect from the magnetizedsoft magnetic components or manufacturing variations, the azimuth spherewill be ellipsoidal.

A vector OO′ represents a displacement between the origin O of thethree-axis orthogonal coordinate system and the center point O′ of theazimuth sphere 15. If the center point O′ of the azimuth sphere can becalculated correctly, a value (OP vector) detected by the triaxialmagnetic sensor 3 subject to the internal magnetic field can becorrected using the following equation, to obtain a value (O′P vector)detected by the triaxial magnetic sensor 3 not subject to the internalmagnetic field. As a result, it is possible to calculate an accurateazimuth which the geomagnetic application device faces.{right arrow over (O′P)}={right arrow over (OP)}−{right arrow over(OO′)}  [Formula 1]

To accurately calculate the center point O′ of the azimuth sphere 15which is ellipsoidal, it is ideal to obtain measurement points under thecondition that the portable device 2 is turned evenly in everydirection. However, this approach to actually force such operations onthe user causes a problem for the user to shoulder a heavy burden.Consequently, the present invention employs a means that selectsmeasurement points from among the obtained measurement points so as toenable to obtain the center point of an ellipsoidal sphere with highestaccuracy in small number.

First, in the present invention, geomagnetic vector data in line formeasurement points suitable for solving an equation of an ellipsoidalsphere is acquired, that is, the measurement point acquiring means 4 isperformed. In the use of the portable device 2, the user does not alwaysutilize the electronic compass functions, and there are also many casesin which enough time to acquire measurement points is secured until theelectronic compass functions are utilized after turning on power.Therefore, in the meantime, the measurement points may be automaticallyobtained utilizing postural change of the portable device 2, which iscaused by pointing the portable device 2 to various directions in a bagor a pocket or is caused during operation for e-mail or phone call;further, an indication to ask rotating operation of the user maybedisplayed on the screen 20 of the portable device 2 in the case wherethe user needs the electronic compass functions in a phase that asufficient number of offset calculation measurement points has not beenobtained. In such a manner, the data of magnetic vectors in accordancewith the various directions which the portable device faces, is acquiredby the triaxial magnetic sensor 3 and stored in the measurement pointstorage unit 8.

The data will be acquired either when the user is conducting theoperation of rotating the portable device 2 or when he is not doing so.Even if magnetic vectors are obtained consecutively in the conditionthat there is no change in posture of the portable device 2, it meansthat a plurality of measurement points having almost the same value canbe acquired only. Therefore, after one data piece of a geomagneticvector is stored in the measurement point storage unit 8, it ispreferable to calculate a distance on an azimuth sphere between the mostrecently stored data and a newly acquired measurement point and, only ifthe distance is equal or more than a predetermined value, newly storethe data of the geomagnetic vector in the measurement point storage unit8. It is thus possible to efficiently utilize the memory allocated asthe measurement point storage unit 8 and also reduce time required toselect offset calculation measurement points as described later.Specifically, for example, if a point distant by at least 100 mG can beacquired, the point may be newly stored as a measurement point. Thisoperation is repeated until the number of the measurement points storedin the measurement point storage unit reaches a predetermined quantity,at which time the measurement point acquiring means 4 is ceased. Thepredetermined number of the measurement points, which varies dependingon required accuracy etc., may be set to 60, for example. Of course, itcan be increased more to raise the offset accuracy.

However, depending on the way the user conducts the operations, theportable device 2 may be postured only in a specific direction in somecases. In such a case, the measurement points are also distributed onlyin a specific position on the azimuth sphere, so that the center pointof the ellipsoidal sphere cannot be accurately obtained. Consequently,it is more preferable to calculate a maximum value and a minimum valueof component values of each of the three orthogonal axes in real timeand, if the values are less than a predetermined value, continue tostore measurement points further or display on the screen 20 anindication to the effect that the accuracy might lower. Specifically,for example, the predetermined value can be set to 500 mG.

After necessary measurement points have been obtained by performing themeasurement point storage means 4, offset calculation measurement pointssuitable for accurately obtaining the center point of the ellipsoidalsphere are subsequently selected from among the obtained measurementpoints.

First, the offset calculation measurement point selection means 5selects points, the axial component values of which are maximum orminimum in each of the three orthogonal axes. FIG. 5 illustrates anexample of distribution of the measurement points on the azimuth sphereviewed from a direction of the Z axis in the case where the Z axis isset to be orthogonal to the paper. As shown in this figure, the means 5selects measurement points A and B the axial component values of whichare respectively maximum and minimum in the X axis, and measurementpoints C and D the axial component values of which are respectivelymaximum and minimum in the Y axis and stores them in the offsetcalculation measurement point storage unit 9. Although no figure isshown, the means 5 similarly selects measurement points E and F theaxial component values of which are respectively maximum and minimum inthe Z axis and similarly stores them in the offset calculationmeasurement point storage unit 9. In this case, the selected measurementpoints should preferably be deleted from the measurement point storageunit 8 simultaneously with storage in the offset calculation measurementpoint storage unit 9. In such a manner, the six measurement points areselected.

In a method of solving an ellipsoidal sphere equation to be describedlater, the equation includes six unknowns. Therefore, the equation canbe solved by six measurement points only. However, in the presentembodiment, to improve accuracy in calculation of a center point,measurement points other than those six points will be selected usingthe following method.

As described above, six points, the axial component values of which aremaximum or minimum in the three orthogonal axes of the magnetic sensorwere selected. In addition, other orthogonal axes are virtually definedto select additional points, the axial component values of which aremaximum or minimum in each of the other orthogonal axes. Specifically,as shown in FIG. 6, the X axis and Y axis as two axes of the threeorthogonal axes are selected and inclined by 45 degrees to defineresultant virtual orthogonal axes X′ axis and Y′ axis, and selectpoints, the axial component values of which are maximum or minimum inthe X′ axis and Y′ axis. In the case shown in FIG. 6, the componentvalues in the X′ axis are maximum and minimum at points G and Hrespectively, and the component values in the Y′ axis are maximum andminimum at points I and J respectively. Those four points are stored inthe offset calculation measurement point storage unit 9.

Although in this example, the X and Y axes were selected as twoarbitrary axes, of course, any other two axes may be selected. Althoughthe virtual axes were set by rotating the X and Y axes in a planeincluding the X and Y axes, of course the X and Y axes may be inclinedin any other directions to define the virtual axes.

Although an inclination angle for setting the virtual axes is optimally45 degrees, the angle may be selected in a range between 30 and 60degrees. As a result of such selection, 10 measurement points for offsetcalculation can be selected.

Depending on the data measured first, some of the earlier selected sixpoints may overlap with the newly selected four points in some cases. Insuch a case, the number of the measurement points selected hitherto maybe 9 or less rather than 10, nevertheless, in the case where furthermeasurement points will be subsequently selected as described later, themeasurement points may be selected so that the selected measurementpoints finally reach a predetermined quantity.

Although it is possible to solve the ellipsoidal equation using the 10measurement points selected in such a manner as explained above, thepresent embodiment would additionally select further measurement pointsby using a method shown in FIG. 7 in order to further improve theaccuracy of center point calculation.

First, measurement points yet to be selected for offset calculation at apoint where those 10 measurement points have been selected are stored inthe yet-to-be-selected measurement point storage unit 16 (step S1).Then, data of arbitrary one point (except for any point that hasundergone steps S3 and S4 with the same reference distance value) istaken out from the yet-to-be-selected measurement point storage unit 16(step S2), to calculate a distance between this measurement point andevery point already selected for offset calculation (step S3).

Then, the calculated distance from every selected measurement point ischecked to see whether the distance is equal to or farther than thereference value (step S4). Only if every distance is equal to or fartherthan the reference value, the taken out measurement point is newlystored in the offset calculation measurement point storage unit 9,meanwhile, the data of which is deleted from the yet-to-be-selectedmeasurement point storage unit 16 (step S5) and the number of theselected measurement point is checked to see whether the quantity hasreached a predetermined quantity (step S6). If the number has reachedthe predetermined quantity, the processing is terminated and, otherwise,shifts to step S7. In the case where the distance from any one of thealready selected measurement points is decided to be less than thereference value in step S4, the processing directly shifts to step S7.In step S7, it is determined if all of the data in theyet-to-be-selected measurement point storage unit has been checked underthe currently set reference distance value. Where all the data has beenchecked, the reference distance value is changed to a smaller value(step S8) to return to step S2. Otherwise, the processing returns tostep S2 again without changing the reference distance value, to repeatthe same steps.

By selecting measurement points according to the described procedure, itis possible to securely select the measurement points in condition wherethey are scattered to various positions on an azimuth sphere withoutbeing unevenly distributed in a specific area on it, of course, althoughlimited to the range of the data first stored in the measurement pointstorage unit 8. Therefore, it is possible to securely select acombination of measurement points that enable determining an ellipsoidalcenter point most accurately from among the obtained measurement points.

Although a larger number of the finally selected measurement pointsimprove the center point calculation accuracy, the number of points inexcess of a certain value depresses the effects of improving theaccuracy even if the points would be selected more, and besides,increases a calculation amount to prolong the processing. For thisreason, the number of points should preferably be about 15 to 20including the preceding 10 measurement points. In the presentembodiment, the number of the selected points was set to 18.

The reference distance value is not limited to a specific value and canbe set to, for example, 300 mG as the initial value and decreased by 25mG at a time. By this data processing, it is possible to selectmeasurement points that can be considered to be optimal for the purposeof offset calculation.

Next, a description will be given of a procedure for solving an equationof an ellipsoidal sphere by using selected offset calculationmeasurement points. The ellipsoidal sphere equation can be written asthe following Equation 2.

$\begin{matrix}{{\frac{\left( {X - {OffsetX}} \right)^{2}}{{GainX}^{\; 2}} + \frac{\left( {Y - {OffsetY}} \right)^{2}}{{GainY}^{\; 2}} + \frac{\left( {Z - {OffsetZ}} \right)^{2}}{{GainZ}^{\; 2}} - 1} = 0} & \left\lbrack {{Formula}\mspace{14mu} 2} \right\rbrack\end{matrix}$

In the present embodiment, this equation is solved by the least-squaresmethod to obtain parameters of the ellipsoidal sphere as unknowns. Thisequation has six unknown parameters of OffsetX, OffsetY, and OffsetZwhich are offset values on the respective orthogonal axes as well asGainX, GainY, and GainZ which correspond to the length (gain) of a mainaxis of the ellipsoidal sphere.

In the case of trying to obtain those parameters using the 18measurement points, an ellipsoidal sphere including all of themeasurement points cannot be obtained. Therefore, an ellipsoidal spherein which deviations (errors) from the 18 measurement points is mademinimized, is obtained by using the least-squares method. Then, squaresof errors between the respective measurement points and an ellipsoidalsphere to be obtained are totalized to the resultant total to be e,which can be expressed by the following Equation 3 by using Equation 2.

$\begin{matrix}{e = {\sum\limits_{n = 1}^{N}\begin{pmatrix}{\frac{\left( {X_{n} - {OffsetX}} \right)^{2}}{{GainX}^{\; 2}} + \frac{\left( {Y_{n} - {OffsetY}} \right)^{2}}{{GainY}^{\; 2}} +} \\{\frac{\left( {Z_{n} - {OffsetZ}} \right)^{2}}{{{GainZ}\;}^{2}} - 1}\end{pmatrix}^{2}}} & \left\lbrack {{Formula}\mspace{14mu} 3} \right\rbrack\end{matrix}$

To obtain parameter values that can minimize the value of Equation 3,Equation 3 is partially differentiated with respect to all of the sixparameters respectively and a solution to it is defined to be 0. As aresult, the following six simultaneous equations can be obtained(Equation 4).

$\begin{matrix}\left\{ \begin{matrix}{\frac{\partial e}{\partial{GainX}} = 0} \\{\frac{\partial e}{\partial{GainY}} = 0} \\{\frac{\partial e}{\partial{GainZ}} = 0} \\{\frac{\partial e}{\partial{OffsetX}} = 0} \\{\frac{\partial e}{\partial{OffsetY}} = 0} \\{\frac{\partial e}{\partial{OffsetZ}} = 0}\end{matrix} \right. & \left\lbrack {{Formula}\mspace{14mu} 4} \right\rbrack\end{matrix}$

Since these equations are nonlinear simultaneous equations, it ispossible to obtain the six parameters by performing convergentcalculations based on a known method (dichotomy, Newton-Raphson method)configured to obtain solutions of nonlinear simultaneous equations.

Now that the offset values OffsetX, OffsetY, and OffsetZ of the threeorthogonal axes are obtained, an azimuth is calculated usingpost-correction data (Xn′, Yn′, Zn′) obtained by correctingpre-correction data (Xn, Yn, Zn) as indicated by Equation 5 based on theobtained offset values for magnetic vectors and the values of the mainaxis lengths corresponding to the sensitivities of the three-axissensors.

$\begin{matrix}\left\{ \begin{matrix}{X_{n}^{\prime} = \frac{X_{n} - {OffsetX}}{GainX}} \\{Y_{n}^{\prime} = \frac{Y_{n} - {OffsetY}}{GainY}} \\{Z_{n}^{\prime} = \frac{Z_{n} - {OffsetZ}}{GainZ}}\end{matrix} \right. & \left\lbrack {{Formula}\mspace{14mu} 5} \right\rbrack\end{matrix}$

However, if earth magnetism is reduced for any reason in an externalenvironment at positions where offset calculation measurement pointshave been obtained, the obtained main axis length decreasescorrespondingly, so that there is a possibility that a trouble may occurwhen the distance is compared to the reference value in the stepsdescribed above. Therefore, it is preferable to store the output of anarbitrary axis sensor of the triaxial magnetic sensors in an environmentwhere earth magnetism magnitude has been known beforehand to grasp thesensitivity of the reference magnetic sensor and correct the length ofthe main axis of the ellipsoidal sphere by using the value of thissensitivity. By performing correction in such a manner, it is madepossible to select correct measurement points and calculate an azimuthirrespective of the state of earth magnetism at positions where offsetcalculation measurement points are obtained.

Next, a description will be given of effects of the present embodiment.The present embodiment first selects a total of 10 points by selectingthe points, the axial component value of which are maximum or minimum ineach of the three orthogonal axes from among the measurement points ofearth magnetism vectors measured using the triaxial magnetic sensor andthen selecting the points, the axial component values of which aremaximum or minimum in each of a virtual orthogonal axes inclined by 45degrees with respect to arbitrary two axes (X-axis and Y-axis in thepresent embodiment) among the three orthogonal axes a.

Then, the present embodiment selects eight more measurement points whichare distant from all the other measurement points including those 10points by a predetermined reference value, to select a total of 18measurement points.

Thus, it is possible to securely select from among acquired measurementpoints those that are mutually distant on an azimuth sphere and are notunevenly distributed to a specific area. Therefore, it is possible tocalculate an accurate offset value even with fewer measurement pointsselected.

The present technique can be utilized not only in an electronic compassdescribed as one embodiment of the invention above but also in the caseof detecting earth magnetism with magnetic sensor and calculatingvarious physical values such as an azimuth based on results of thedetection. That is, even when applying the present technique to anydevice other than the electronic compass, for example, an air mouse, ifsimilarly detecting the direction of the mouse, this technique can beutilized to obtain an accurate offset value and then calculate the mousedirection accurately and perform operations on the computer screen inthe air. Further, even in the case of determining an angular speed ofrotation as in the case of a magnetic gyroscope, a rotation axis shouldbe determined from accurate geomagnetic vectors to obtain an angularspeed. Therefore, an offset value can be obtained accurately accordingto the technique of the present invention to calculate the rotation axisutilizing geomagnetic vectors corrected on the basis of the offset valueso that obtain accurate rotation angle and angular speed of rotation canobtained. In this case, similar effects can be obtained by similarlyselecting measurement points according to the technique similar to thepresent embodiment.

Further, measurement points to be selected are narrowed down to thosethat are optimal for accurate offset value calculation, and thereforemore accurate calculation in a small amount of time is made possibledifferently from the case of acquiring many measurement points anddirectly calculating with the least squares without taking no account ofthe distribution of those points on an azimuth sphere. Further, it ispossible to avoid a problem that accuracy degrades due to a stronginfluence of the values of many measurement points unevenly present in aspecific area as in the case of offset calculation conducted using suchmeasurement points. Therefore, the center point of an ellipsoidal spherecan be obtained in the most efficient manner.

Second Embodiment

In the first embodiment, the number of measurement points to be selectedwas set to 18; that is, points, the component value of which would bemaximum or minimum in the three orthogonal axes and points, thecomponent value of which would be maximum or minimum in the virtualaxes, and then eight more measurement points have been selected in thesteps shown in FIG. 7. The present embodiment is one example in whichavailability of offset correction performed by simple processing isregarded as more important than accuracy; that is, without selecting theeight measurement points to be selected in the steps shown in FIG. 7, 10measurement points are used to obtain the center point of an ellipsoidalsphere in calculation of an azimuth. Methods for solving an equation ofthe ellipsoidal sphere and calculating the azimuth after the measurementpoints are selected are all the same as those in the first embodiment.The present embodiment has an advantage of quicker calculation than thefirst embodiment while being slightly worse in accuracy of an offsetvalue.

Third Embodiment

The present embodiment, in an attempt to further shorten the calculationtime more than the second embodiment, selects only six measurementpoints, the component values of which are maximum or minimum in threeorthogonal axes and calculates an offset value. By substituting the sixmeasurement points into the equation (Equation 1) of an ellipsoidalsphere, six equations can be obtained, so that rather than using theleast-squares method, the equation into which values of the measurementpoints are substituted can be solved as it is to obtain six unknowns.

Although the present embodiment is less accurate in calculation of anoffset value and a main axis length than the first and secondembodiments, it may be improbable that the six points for use incalculation, although selected in small numbers, are unevenlydistributed on the azimuth sphere, from a viewpoint of its selectingmethod. Therefore, the method of the present embodiment is considered tobe an optimal selection method as a method for solving an equation byusing only the six points. In addition, although this embodiment issomewhat inferior to the first embodiment and such in the calculationaccuracy, since only the six points are used in calculation, anadvantage of reduction in electrical requirement can be obtained inaddition to an effect of shortening of processing time owing to greatlymitigated calculation burdens.

Also in the second and third embodiments, the invention can be appliedto other use than an electronic compass just the same as in the case ofthe first embodiment described above. An optimal method selected fromamong the first through third embodiments depends on requirements suchas calculation accuracy required in each case or need for rapid azimuthcalculation even at the expense of accuracy to some extent. Therefore,even the same geomagnetic application device should preferably be usedwhile selecting an optimal method for calculation of an azimuth etc. ineach case.

The invention claimed is:
 1. A geomagnetic application device applyingearth magnetism using a value of the earth magnetism determined bymeasurement, the device comprising: a triaxial magnetic sensororthogonally arranged to detect triaxial components of a geomagneticvector which vary with movement of the geomagnetic application device orwith postural change of the geomagnetic application device, asorthogonal triaxial component data; a measurement point acquiring meansfor acquiring a predetermined number of geomagnetic vectors using thetriaxial magnetic sensor and storing acquired data in a measurementpoint storage unit; a calibration means for calibrating offset of thetriaxial magnetic sensor; and an azimuth calculation means forcalculating an azimuth which the geomagnetic application device faces,correcting the geomagnetic vectors based on a calibrated offset valueobtained by the calibration means, wherein the calibration means isprovided with an offset calculation measurement point selection meansfor selecting at least six measurement points of the geomagnetic vectorsfrom among a data set stored in the measurement point storage unit bythe measurement point acquiring means and storing the selectedmeasurement points in an offset calculation measurement point storageunit, and an offset value calculation means for obtaining coordinates ofa center point of an ellipsoidal sphere by solving an equation of anellipsoidal sphere body based on the at least six measurement pointsstored in the offset calculation measurement point storage unit and forstoring the obtained coordinates in a calibrated offset value storageunit, the offset calculation measurement point selection means isconfigured to select the measurement points from among the data setstored in the measurement point storage unit so as to include at leastsix points, the component values of which are maximum or minimum in eachof the three orthogonal axes, and the offset value calculation meanscalculates parameters which define the ellipsoidal sphere as an azimuthsphere, based on the data of the selected measurement points.
 2. Thegeomagnetic application device according to claim 1, wherein the offsetcalculation measurement point selection means selects arbitrary two axesamong the three orthogonal axes to define virtual coordinate axesinclined by 30 to 60 degrees with respect to the two axes respectively,further selects points, the component values of which are maximum orminimum in each of the virtual coordinate axes and stores the selectedpoints in the offset calculation measurement point storage unit, andcalculates the parameters which define the ellipsoidal sphere as anazimuth sphere, based on the selected measurement points.
 3. Thegeomagnetic application device according to claim 1 or 2, wherein theoffset calculation measurement point selection means repeats a procedureof taking out the data of the measurement points one at a time fromamong the data set stored in the measurement point storage unit exceptfor the measurement points previously selected by the offset calculationmeasurement point selection means and newly storing the measurementpoints taken out in the offset calculation measurement point storageunit only if the distance from the measurement point to all of themeasurement points already selected and stored in the offset calculationmeasurement point storage unit are equal to or more than a predeterminedvalue, as decreasing the predetermined value serving as a standardlittle by little, until a predetermined number of the points are stored.4. The geomagnetic application device according to claim 1 or 2, whereinthe offset value calculation means calculates the parameters of theellipsoidal sphere by using least-squares method based on the selectedmeasurement points.
 5. The geomagnetic application device according toclaim 1 or 2, wherein instructions to induce rotating operation aredisplayed on a screen of the geomagnetic application device, and thenthe measurement point acquiring means is performed during the rotatingoperation thus induced.
 6. The geomagnetic application device accordingto claim 1 or 2, wherein the geomagnetic vector is detected duringoperation of the measurement point acquiring means and a difference isobtained in real time during acquisition between a maximum value and aminimum value of data of each axial component of the three orthogonalaxes using the acquired measurement points and then an indication to theeffect that the operation of the measurement point acquiring means hasended is displayed on the screen of the geomagnetic application deviceon condition that a predetermined number of the measurement points isobtained at a point where the difference exceeds a predeterminedreference value for all of the three axes.
 7. The geomagneticapplication device according to claim 1 or 2, wherein when thegeomagnetic vector is detected in sequence during operation of themeasurement point acquiring means, a reference point serving as astandard is first acquired, and then an acquisition means is repeatedfor storing a point having a predetermined distance from the referencepoint in the measurement point storage unit only in a case where suchpoint is acquired to define the point as an update reference point, andfurther storing a point having a predetermined distance from the updatedreference point in the measurement point storage unit.
 8. Thegeomagnetic application device according to claim 1 or 2, wherein theazimuth calculation means obtains sensitivities of the triaxial magneticsensor based on lengths of main axes obtained by solving the ellipsoidalsphere equation and calculates an azimuth which the geomagneticapplication device faces based on a value of the geomagnetic vectorscorrected on the basis of the obtained sensitivities.